package edu.unr.cater.npap.client.managed.ui;

import com.google.web.bindery.requestfactory.gwt.ui.client.ProxyRenderer;
import edu.unr.cater.npap.client.proxy.AddressProxy;
import edu.unr.cater.npap.client.proxy.ContactProxy;
import edu.unr.cater.npap.client.proxy.PlatformUserProxy;
import edu.unr.cater.npap.client.proxy.TransportationAgencyProxy;
import java.util.Set;

public class ContactProxyRenderer extends ProxyRenderer<ContactProxy> {

    private static edu.unr.cater.npap.client.managed.ui.ContactProxyRenderer INSTANCE;

    protected ContactProxyRenderer() {
        super(new String[] { "firstName" });
    }

    public static edu.unr.cater.npap.client.managed.ui.ContactProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new ContactProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(ContactProxy object) {
        if (object == null) {
            return "";
        }
        return object.getFirstName() + " (" + object.getFirstName() + ")";
    }
}
